package com.unitd.modules.configcenter.entity;

import com.unitd.comm.entity.DataEntity;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * @desc 应用加密信息表表对应实体对象
 * @filename AppSecret.java
 * @copyright www.unitd.com
 * @author Hudan
 * @version 1.0
 * @date  2018-01-30
 */
@Table(name = "app_secret")
public class AppSecret extends DataEntity {

	/** 应用ID */
	@Column(name = "app_id")
	private String appId;
	/** 所属环境 */
	@Column(name = "env")
	private String env;
	/** 加密类型(RSA/DES) */
	@Column(name = "secret_type")
	private String secretType;
	/** 加密的密钥 */
	@Column(name = "secret_key")
	private String secretKey;
	/** 加密后的串 */
	@Column(name = "secret_pass")
	private String secretPass;
	/* ************************** 与数据库字段不直接关联而是对应外键对象或数据处理的字段 ************************** */

	public AppSecret() {
		super();
	}

	public AppSecret(String id){
		super(id);
	}

	public AppSecret(String appId, String env, String secretType){
		this.appId = appId;
		this.env = env;
		this.secretType = secretType;
	}

	public AppSecret(String id, String appId, String env, String secretType, String secretKey, String secretPass){
		this.id = id;
		this.appId = appId;
		this.env = env;
		this.secretType = secretType;
		this.secretKey = secretKey;
		this.secretPass = secretPass;
	}

	public String getAppId() {
		return appId;
	}
	public void setAppId(String appId) {
		this.appId = appId;
	}
	public String getEnv() {
		return env;
	}
	public void setEnv(String env) {
		this.env = env;
	}
	public String getSecretType() {
		return secretType;
	}
	public void setSecretType(String secretType) {
		this.secretType = secretType;
	}
	public String getSecretKey() {
		return secretKey;
	}
	public void setSecretKey(String secretKey) {
		this.secretKey = secretKey;
	}
	public String getSecretPass() {
		return secretPass;
	}
	public void setSecretPass(String secretPass) {
		this.secretPass = secretPass;
	}
}